cmake_minimum_required(VERSION 3.0.2)
project(move_drive_plan)

add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES move_drive_plan
   CATKIN_DEPENDS roscpp std_msgs
#  DEPENDS system_lib
)



find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)
   find_package(OpenCV 2.4.3 QUIET)
   if(NOT OpenCV_FOUND)
      message(FATAL_ERROR "OpenCV > 2.4.3 not found.")
   endif()
endif()

find_package(Eigen3 3.1.0 REQUIRED)
find_package(Boost  1.54.0  	     # Minimum or EXACT version e.g. 1.36.0
  REQUIRED             					# Fail with error if Boost is not found
  COMPONENTS serialization 				# Boost libraries by their canonical name
  ) 

set(LIBS 
${OpenCV_LIBS} 
${EIGEN3_LIBS}
${Boost_LIBRARIES}
)

include_directories(
  ${PROJECT_NAME}/src
  ${catkin_INCLUDE_DIRS}
)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
	add_library(${PROJECT_NAME} SHARED
	 src/move_plan_sys.cc
	 src/TrackPath.cc
	)
	target_link_libraries(${PROJECT_NAME}
	 ${LIBS}
	)

add_executable(${PROJECT_NAME}_node  src/move_drive_plan_node.cc)
target_link_libraries(${PROJECT_NAME}_node 
  ${catkin_LIBRARIES}
  ${PROJECT_NAME}
)

add_executable(save_track_path_node  src/save_track_path.cc)
target_link_libraries(save_track_path_node
  ${catkin_LIBRARIES}
  ${PROJECT_NAME}
)


